package com.yjc.rabbitmq.springboot_rabbitmq.consumer;

import com.yjc.rabbitmq.springboot_rabbitmq.config.ConfirmConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author shkstart
 * @create 2022-08-03 12:57
 */
@Slf4j
@Component
public class ConfirmConsumer {

    @RabbitListener(queues = ConfirmConfig.CONFIRM_QUEUE)
    public void consumerQueue(Message message) {
        String res = new String(message.getBody());
        log.info("接收到的队列confirm.queue的消息：{}", res);

    }
}
